package com.ysd.lis.controller.lab;


import com.ysd.common.Result;
import com.ysd.lis.controller.pub.BaseController;
import com.ysd.lis.request.TransResultDto;
import com.ysd.lis.service.lab.LabTransResultService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


/**
 * <p>
 * 结果二次处理 前端控制器
 * </p>
 *
 * @author HuaiXing
 * @since 2024-01-20
 */
@RestController
@RequestMapping("/lab/trans/result")
public class LabTransResultController extends BaseController {

    @Autowired
    LabTransResultService labTransResultService;

    @ApiOperation("获取当前报告项目的结果处理规则")
    @GetMapping("/getTransResult")
    public Result getTransResult(@RequestParam(value = "itemNo") String itemNo,@RequestParam(value = "rptGroup",required = false) String rptGroup) {
        return labTransResultService.getTransResult(itemNo,rptGroup);
    }

    @ApiOperation("修改")
    @PostMapping("/saveOrUpdateTransResult")
    public Result saveOrUpdateTransResult(@RequestBody TransResultDto dto) {
        return labTransResultService.saveOrUpdateTransResult(dto);
    }

    @ApiOperation("批量删除")
    @PostMapping("/batchDeleteTransResult")
    public Result batchDeleteTransResult(@RequestBody TransResultDto dto){
        return  labTransResultService.batchDeleteTransResult(dto);
    }

}
